/**
 * @version 2007-5-8
 * @author xalinx at gmail dot com
 */
package org.nanhill.commons.dbutil.handlers;

import java.sql.ResultSet;
import java.sql.SQLException;

/**
 * @version 2007-5-8
 * @author xalinx at gmail dot com
 *
 */
public interface RowHandler {
    /**
     * Turn the <code>ResultSet</code> into an Object.
     * 
     * @param rs The <code>ResultSet</code> to handle.  It has not been touched
     * before being passed to this method.
     * 
     * @return An Object initialized with <code>ResultSet</code> data. It is
     * legal for implementations to return <code>null</code> if the 
     * <code>ResultSet</code> contained 0 rows.
     * 
     * @throws SQLException
     */
    Object handle(ResultSet rs, int rowNum) throws SQLException;
}
